<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class Order extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
       //订单的商品信息
        Schema::create('order', function (Blueprint $table) {
            $table->increments('id');
            $table->string('order_num')->comment('订单编号');
            $table->integer('user_id')->comment('用户id');
            $table->integer('address_id')->comment('地址id');
            $table->decimal('price',6,2)->comment('价格');
            $table->tinyInteger('status')->comment('订单状态');

            $table->timestamps();
        }); 

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::drop('order');
    }
}
